put If Null
inline fun <D, T> ReadWriteProperty<D, T?>.putIfNull(crossinline default: () -> T): ReadWriteProperty<D, T>
Content copied to clipboard
Read from the delegate if non-null, otherwise set the delegate to default and return it.
default will be re-executed each time null is read.
Sources
js source
Link copied to clipboard